package Model.check_inside_util;

import Model.DrawModel.CalPoint;

import java.util.ArrayList;

public class CheckSurround {

    public static double Surround(ArrayList<CalPoint> ships, ArrayList<CalPoint> targets) {

        double result = 0;

        for (CalPoint item: targets) {
            result += Not(CheckIsInside.CheckInsideReturnK(ships, item));
        }

        System.out.println("被包围情况：" + result/targets.size());
        return result/targets.size();
    }

    public static int Not(double k) {
        if (k == 0) return 1;
        return 0;
    }
}
